package BehaviorModel.stateModel;

/**
 * 功能描述: 不能抽奖状态
 * 2024/02/20
 *
 * @see State
 * ZhangYi
 */
public class NoRaffleState extends State{

    RaffleActivity activity ;

    public NoRaffleState(RaffleActivity activity) {
        this.activity = activity;
    }

    @Override
    public void deductMoney() {
        System.out.println(" 扣除了50积分,可以抽奖了 ");
        // 扣除积分后, 设置状态为 可抽奖状态
        activity.setState(activity.getCanRaffleState());
    }

    @Override
    public boolean raffle() {
        System.out.println(" 还不能抽奖,需要先扣除积分 ");
        return false;
    }

    @Override
    public void dispensePrize() {
        System.out.println("不能发放奖品");
    }
}
